<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateLinksTable extends Migration{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up(){
        //友情链接表
        Schema::create('links', function (Blueprint $table) {
            $table->engine='MyISAM';
            $table->comment='友情链接表';
            $table->increments('id')->unsigned()->comment('自增长主键');
            $table->string('link_name',60)->default('')->comment('友情链接名称');
            $table->string('link_site', 60)->default('')->comment('友情站点ID');
            $table->string('link_url', 200)->default('')->comment('友情链接地址');
            $table->mediumInteger('link_sort')->index('link_sort')->default(0)->comment('友情链接排序');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::drop('links');
    }
}
